Setup client systemd unit
備考
ℹ️ この systemd ユニットを使用して、再起動時に TunGo を自動的に起動します。
警告
⚠️ TunGo systemd ユニットにはデフォルト(最後に使用した)設定が必要です。
⚙️ 前提条件
- TunGo がクイックスタートの説明に従ってインストールされていること。
🛠️ セットアップ
1️⃣ サービスファイルを作成
sudo vim /etc/systemd/system/tungo.service
2️⃣ この設定を貼り付け
[Unit]
Description=TunGo VPN Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=tungo c
User=root
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
3️⃣ サービスを有効化
sudo systemctl enable tungo.service
4️⃣ サービスを開始
sudo systemctl start tungo.service
5️⃣ ステータスを確認
sudo systemctl status tungo.service